package com._520it.crm.query;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

@Setter@Getter
public class CheckQueryObject extends QueryObject {
    private String organizationNameD;   //机构部门名称
    private String productName;         //产品名称
    private String aplicantName;        //投保人名称
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date beginDateD;            //保险开始日期1

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date endDateD;              //保险开始日期2
    private BigDecimal payableBeginC;//保险金额1
    private BigDecimal payableEndC;  //保险金额2
    private Integer paymentTypeC;        //缴费类型
    private Integer paymentStatusC;      //缴费状态

    private String paymentTypeD;        //缴费类型

    public String getOrganizationNameD() {
        return StringUtils.isNotBlank(organizationNameD) ? organizationNameD : null;
    }

    public String getProductName() {
        return StringUtils.isNotBlank(productName) ? productName : null;
    }

    public String getAplicantName() {
        return StringUtils.isNotBlank(aplicantName) ? aplicantName : null;
    }
}
